--自然震慑
local ziranzhenshe = fk.CreateSkill{
    name =  "mcdh_ziranzhenshe",
}

ziranzhenshe:addEffect(fk.DamageInflicted,{
    can_trigger = function(self, event, target, player, data)
        local slots = target:getAvailableEquipSlots()
        table.removeOne(slots,"TreasureSlot")
        return player:hasSkill(self) and player:getMark("mcdh_charge") >= 3
                and #slots ~= 0
    end,
    on_cost = function(self, event, target, player, data)
        local room = player.room
        return room:askForSkillInvoke(player,self.name, data)
    end,
    on_use   = function(self, event, target, player, data)
        local room = player.room
        lib.LoseCharge(player,player,3,self.name)
        local choices = target:getAvailableEquipSlots()
        table.removeOne(choices,"TreasureSlot")
        local choice = room:askForChoice(player, choices, self.name, "#ziranzhenshe-abort")
        room:abortPlayerArea(target, choice)
        data.damage = data.damage - 1
    end
})

return ziranzhenshe